package GameServer

import (
	. "SGNet"
)

const (
	CMD_AddHallPlayer   = 0
	CMD_GetServerNumber = 1
	CMD_ClientLost      = 2
	CMD_RunNewScene     = 3
)

func CmdMessage(id uint16, params ...interface{}) *Message {
	retMessage := &Message{}
	retMessage.Type = MESSAGETYPE_CMD
	retMessage.Id = id
	retMessage.Param = make(map[string]interface{})
	//0 1 2 3
	for i := 0; i < len(params); i += 2 {
		retMessage.Param[params[i].(string)] = params[i+1]
	}
	return retMessage
}
